package com.dimong.loan.sdk.ui.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mobile.videonews.li.sdk.R;

/**
 * Created by wuligang on 2018/3/28.
 */

public abstract class BaseRecyclerViewHolder extends RecyclerView.ViewHolder {
    protected Context mContext;

    public static View getView(Context context, int resId, ViewGroup parent) {
        return LayoutInflater.from(context).inflate(resId, parent, false);
    }

    public BaseRecyclerViewHolder(Context context, int resId, ViewGroup parent) {
        super(getView(context, resId, parent));
        this.mContext = context;
    }
    public void setData(Object object){

    }
    public final <T extends View> T findViewById(int id){
        return itemView.findViewById(id);
    }
}
